<?php

namespace Library;

class JSONParser {

    private $string;
    private $object;

    public function __construct() {
        
    }

    public function setString($string) {
        $this->string = $string;
    }

    public function setObject($object) {
        $this->object = $object;
    }

    public function stringToObject() {
        return json_decode($this->string, true);
    }

    public function objectToString() {
        return json_encode($this->object);
    }

}